package leetcodecompetition.D357;

/**
 * @Author: Siantar
 * @Date: 2023-08-06-11:10
 * @Description: 1.0
 */
public class T6925 {
    public String finalString(String s) {
        StringBuilder res = new StringBuilder();
        for (char c : s.toCharArray()) {
            if (c == 'i') {
                res.reverse();
            } else {
                res.append(c);
            }
        }
        return res.toString();
    }
}
